<template>
	<view class="">
		<view class="" v-for="(item,index) in arr" :key="index" @click="examine(item.id)">
			<view class="bigbox">
				<view class="housename">
					{{item.community_id.name}}
				</view>
				<view class="ifobxo">
					<text class="room">{{item.house_id.room}}室</text>
					<text class="hall">{{item.house_id.hall}}厅</text>
					<text class="area">{{item.house_id.orientation}}</text>
					<!-- <text class="orientation">{{item.house_id.orientation}}</text> -->
					<text class="plotname">{{item.house_id.name}}</text>
				</view>
				<view class="pricebox">
					<text class="pricename">成交价:</text>
					<text class="price">{{item.money}}元</text>
				</view>
				<view class="clientbox">
					<text class="clientinfo">
						客户信息:
					</text>
					<text class="contant">{{item.guard_users_id.nickname || item.guard_users_id.name}}</text>
					<text class="contant_telephone">{{item.guard_users_id.phone}}</text>
				</view>
				<view class="policebox" v-if="item.security_id.name">
					<image src="https://fangguaner.wm76.mtnet.ren/static/applet/jincha.png" mode="" class="policeimg">
					</image>
					<text class="policename">{{item.security_id.name}}</text>
				</view>
				
				<view class="hr"></view>
				
				<view class="lastbox">
					<view class="brokerbox">
						<text>提交人:</text>
						<text class="brokername">{{item.agent_id.name}}</text>
					</view>
				</view>
			</view>
			<view class="hrss"></view>
		</view>


	</view>
</template>

<script>
	import {TransactionRecordList} from "../../api/api/index.js"
	export default{
		data(){
			return{
				isOk:false,
				page:0,
				arr:[],
				limit:8
			}
		},
		methods:{
			getlist(){
				if(this.isOk){
					return uni.showToast({
						icon: 'none',
						title: '没有更多了'
					})
				}
				uni.showLoading({
					mask:true,
					title: '加载中'
				})
				this.page ++
				let data={page:this.page,limit:this.limit}
				TransactionRecordList(data).then(res=>{
					uni.hideLoading()
					// console.log(res.data)
					this.arr=this.arr.concat(res.data)
					if(res.data.length < this.limit){
						this.isOk = true
					}
				})
			},
			examine(id){
				this.arr=[]
				this.page=0
				this.isOk=false
				this.jumpLink({link:"/pages/markparticulars/index",query:{id:id,genre:1}})
			}
		},
		onShow() {
			this.getlist()
		}
	}
</script>

<style scoped lang="less">
	.bigbox {
		padding: 57rpx 34rpx 35rpx 38rpx;
		box-sizing: border-box;

		.housename {
			font-family: MicrosoftYaHei-Bold;
			font-size: 28rpx;
			color: #282828;
			font-weight: 700;
			margin-bottom: 20rpx;

		}

		.ifobxo {
			font-family: MicrosoftYaHei;
			font-size: 22rpx;
			color: #878787;
			margin-bottom: 38rpx;

			text {
				margin-right: 10rpx;
			}
			.room{
				margin-right: 0;
			}
		}

		.pricebox {
			margin-bottom: 38rpx;

			.pricename {
				font-family: MicrosoftYaHei;
				font-size: 22rpx;
				color: #000000;
			}

			.price {
				font-family: PingFang-SC-Heavy;
				font-size: 23rpx;
				color: #e13c35;
				font-weight: 700;
				margin-left: 10rpx;
			}
		}

		.clientbox {
			.clientinfo {
				font-family: MicrosoftYaHei;
				font-size: 22rpx;
				color: #000000;
			}

			.contant {
				font-family: MicrosoftYaHei;
				font-size: 24rpx;
				color: #878787;
				margin-left: 10rpx;
			}

			.contant_telephone {
				font-family: MicrosoftYaHei;
				font-size: 24rpx;
				color: #878787;
				margin-left: 20rpx;
			}
		}

		.policebox {
			margin-left: 469rpx;
			display: flex;
			margin-top: 20rpx;
			align-items: center;

			image {
				width: 25rpx;
				height: 39rpx;
			}

			.policehouse {
				font-family: MicrosoftYaHei;
				font-size: 24rpx;
				color: #666666;
				margin-left: 15rpx;
			}

			.policename {
				font-family: MicrosoftYaHei;
				font-size: 24rpx;
				color: #666666;
				margin-left: 15rpx;
			}
		}

		.hr {
			width: 100%;
			height: 1rpx;
			background-color: #ededed;
			margin-top: 17rpx;
		}

		.lastbox {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 20rpx;
			box-sizing: border-box;

			.brokerbox {
				font-family: MicrosoftYaHei;
				font-size: 24rpx;
				color: #000000;

				.brokername {
					color: #666666;
					margin-left: 10rpx;
				}
			}

			.judgebox {
				.nopass {
					display: inline-block;
					width: 160rpx;
					height: 61rpx;
					background-color: #ffffff;
					border-radius: 31rpx;
					border: solid 3rpx #5f5f5f;
					color: #393939;
					font-family: MicrosoftYaHei;
					font-size: 26rpx;
					text-align: center;
					line-height: 61rpx;
					margin-right: 30rpx;
				}

				.pass {
					display: inline-block;
					width: 160rpx;
					height: 61rpx;
					background-color: #ffffff;
					border-radius: 31rpx;
					border: solid 3rpx #df4744;
					color: #d72f2c;
					font-family: MicrosoftYaHei;
					font-size: 26rpx;
					text-align: center;
					line-height: 61rpx;
				}
			}
		}

	}

	.hrss {
		width: 750rpx;
		height: 15rpx;
		background-color: #ededed;
		margin-top: -rpx;
	}
</style>
